﻿CREATE TABLE [dbo].[ApptOrderLog] (
    [Id]             INT            IDENTITY (1, 1) NOT NULL,
    [OrderId]        INT            NOT NULL,
    [CreateTime]     DATETIME       NOT NULL,
    [OrgOrderStatus] INT            NULL,
    [OrderStatus]    INT            NOT NULL,
    [OperSystem]     NVARCHAR (50)  NULL,
    [OperDesc]       NVARCHAR (500) NULL,
    [Comment]        NTEXT          NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'主键，自增长', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ApptOrderLog', @level2type = N'COLUMN', @level2name = N'Id';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'订单表Id', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ApptOrderLog', @level2type = N'COLUMN', @level2name = N'OrderId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'改变发生的时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ApptOrderLog', @level2type = N'COLUMN', @level2name = N'CreateTime';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'改变前的订单状态，为空表示，是新建订单', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ApptOrderLog', @level2type = N'COLUMN', @level2name = N'OrgOrderStatus';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'改变后的订单状态', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ApptOrderLog', @level2type = N'COLUMN', @level2name = N'OrderStatus';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'修改人；1- 微信服务程序；2-轮询监控系统', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ApptOrderLog', @level2type = N'COLUMN', @level2name = N'OperSystem';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'修改描述', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ApptOrderLog', @level2type = N'COLUMN', @level2name = N'OperDesc';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'备注', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ApptOrderLog', @level2type = N'COLUMN', @level2name = N'Comment';

